﻿@section HeaderSection
{
<link href="../Content/Styles/create_poll_page.css" rel="stylesheet" type="text/css" />
}

@model RipPoll.Library.CommunityPE
 <script type="text/javascript">
     $(document).ready(function () {
         $('a[id=gonext]').click(function () {
             $('form#create1Form').submit();
             return false;
         });

         $('input[type=text]').focus(function () {
             var val = $(this).val();
             if (val == "enter first name" || val == "enter last name"
                || val == "enter city" || val == "enter state") {
                 $(this).val('')
             }
         });

         $('input[type=text]').focusout(function () {
             var val = $(this).val();
             if (val == "") {
                 if ($(this).attr("id") == 'firstname')
                     $(this).val('enter first name');
                 else if ($(this).attr("id") == 'lastname')
                     $(this).val('enter last name');
                 else if ($(this).attr("id") == 'city')
                     $(this).val('enter city');
                 else if ($(this).attr("id") == 'state')
                     $(this).val('enter state');
             }
         });

         $('textarea[id="question"]').focus(function () {
             var val = $(this).val();
             if ($.trim(val) == "Type in your community here. 25 characters max.") {
                 $(this).val('')
             }
         });

         $('textarea[id="question"]').focusout(function () {
             var val = $(this).val();
             if (val == "") {
                 $(this).val('Type in your community here. 25 characters max.');
             }
         });

     });
 </script>

@{
    ViewBag.Title = "   Create a community";
    ViewBag.PageDivId = "headerGeneric";
    ViewBag.Margin = "margin-left:0";
} 
@section LocalHeaderSection
{
    <div id="pageTitle">    
        <span class="pageTitle">Create a Community</span>
        <div id="pageSubtitle">
            <span class="pageSubtitle">Follow your "Communities" and create a "Community"</span>
        </div>
    </div>
}

  
  <form id="create1Form" action="create1" method="post">
  
  <div id="stepBoxMain">
  <br />
  <img src="../content/images/rippoll_icon_black.jpg" width="56" height="51" align="middle" /><span class="topText"> You're on your way to creating a community to connect people with issues that matter.</span> <br />
</div>

<div id="createPageLeft">

<div class="stepBoxText" id="stepBoxComm1">
1. Name your community
</div>
@if(Model != null && !string.IsNullOrEmpty(Model.ImagePath) ){
    <div class="stepBoxText" id="stepBoxComm">
        <a href="../community/create2">2. Enhance your community</a>
    </div>
}
else
{
    <div class="stepBoxText" id="stepBoxComm">
2. Enhance your community</div>
}

@if (Model != null && Model.AccesslevelId != 0)
{
    <div class="stepBoxText" id="stepBoxComm">
        <a href="../community/create3">3. Who can join</a>
    </div>    
}
else
{
    <div class="stepBoxText" id="stepBoxComm">3. Who can join</div>
}


@if (Model != null && !string.IsNullOrEmpty(Model.Question))
{
    <div class="stepBoxText" id="stepBoxComm">
        <a href="../community/create4">4. Ask your question</a>
    </div>
}
else
{<div class="stepBoxText" id="stepBoxComm">4. Ask your question</div>   
}

</div>

<div id="createPageRight">
 <img src="../content/images/community_step1.jpg" width="440" height="42" />

 <div id="inputBox">
   @*<input name="community_name" type="text" id="commTextfield" value="@ViewBag.CommunityText" size="85" />*@
   <textarea name="question" cols="45" id="question" rows="2">@ViewBag.CommunityText
  </textarea>
   <br />
   <span class="charactersLeft">25 characters left</span><br />
   <br />
   Profanity, racial slurs and derogatory remarks will not be allowed. Please keep it clean. <span class="redText">(requirements)<br />
   <br />
   </span>Created by: <span class="redText">
   <label>
        @if (!string.IsNullOrEmpty(ViewBag.FirstName))
        {
            <input name="firstname" type="text" id="firstname" value="@ViewBag.FirstName" disabled="disabled" size="10" />
        }
        else
        {
              <input name="firstname" type="text" id="firstname" value="enter first name" size="10" />
        }
   </label>
   <label>
        @if (!string.IsNullOrEmpty(ViewBag.LastName))
        {
            <input name="lastname" type="text" id="lastname" value="@ViewBag.LastName" disabled="disabled" size="20" />
        }
        else
        {
            <input name="lastname" type="text" id="lastname" value="enter last name" size="20" />
        }
   </label>
   <label>
     @if (!string.IsNullOrEmpty(ViewBag.UserCity))
     {
     <input name="city" type="text" id="city" value="@ViewBag.UserCity" disabled="disabled" size="20" />
     }
     else
     {
           <input name="city" type="text" id="city" value="enter city" size="20" />
     }
   </label>
    @if (!string.IsNullOrEmpty(ViewBag.State))
    {
   <input name="state" type="text" id="state" value="@ViewBag.State" disabled="disabled" size="10" />
    }
    else
    {
         <input name="state" type="text" id="state" value="enter state" size="10" />
     }
   </span><span class="verySmallText"><br />
not required but highly recommended</span><span class="redText"> (see why)
</span><br />
<br />
     <a id="gonext"><img src="../content/images/go_to_step_2.jpg" alt="Click here to go to Step 2" width="200" height="28" border="0" /></a>
 </div>
 <br />
 <span class="viewCategory"><strong><br />
 <br />
 <br />
 <br />
 <br />
 <br />
 Learn how to make your Community look great.</strong></span> Read our <span class="blueHiliteText"><a href="#">recommended settings</a>.</span><br />
     <br />
     <span class="viewCategory"><strong>Still have questions?</strong></span> <span class="blueHiliteText"><a href="#">Watch this tutorial</a></span> or <span class="blueHiliteText"><a href="#">ask for help</a></span>.</div>

  <div id="stepBoxMain">
    <span class="regularText">All polls submitted will be reviewed by our internal audit dept. to make sure they’re not slanderous, malicious, derogatory and basically in poor taste.  Keep it clean.  We want our polls to be taken seriously, since they may deal with local, state, national and worldwide issues.  We strive very hard to make sure that this is a positive experience for those submitting polls and those viewing  and responding to your polls.</span>
</div>


</form>